package com.ruoyi.oa.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 文件对象 oa_file
 * 
 * @author ruoyi
 * @date 2022-02-09
 */
public class OaFile extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 文件id */
    private String id;

    /** 父级文件id */
    @Excel(name = "父级文件id")
    private String fid;

    /** 父级文件路径名 */
    @Excel(name = "父级文件路径名")
    private String parentPath;

    /** 文件或文件夹名称 */
    @Excel(name = "文件或文件夹名称")
    private String serverFilename;

    /** 文件大小 */
    @Excel(name = "文件大小")
    private Long fileSize;

    /** md5，文件夹为空 */
    @Excel(name = "md5，文件夹为空")
    private String md5;

    /** 是否目录 0否，1是 */
    @Excel(name = "是否目录 0否，1是")
    private String isdir;

    /** 文件类型 */
    @Excel(name = "文件类型")
    private String category;

    /** 文件上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "文件上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date uptime;

    /** 文件上传人 */
    @Excel(name = "文件上传人")
    private String uploader;

    /** 文件状态 */
    @Excel(name = "文件状态")
    private String state;

    /** 保留字段1 */
    @Excel(name = "保留字段1")
    private String resrved1;

    /** 保留字段2 */
    @Excel(name = "保留字段2")
    private String resrved2;

    /** 保留字段3 */
    @Excel(name = "保留字段3")
    private String resrved3;

    /** 保留字段4 */
    @Excel(name = "保留字段4")
    private String resrved4;

    /** 子文件 */
    private List<OaFile> children = new ArrayList<OaFile>();

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setFid(String fid) 
    {
        this.fid = fid;
    }

    public String getFid() 
    {
        return fid;
    }
    public void setParentPath(String parentPath) 
    {
        this.parentPath = parentPath;
    }

    public String getParentPath() 
    {
        return parentPath;
    }
    public void setServerFilename(String serverFilename) 
    {
        this.serverFilename = serverFilename;
    }

    public String getServerFilename() 
    {
        return serverFilename;
    }
    public void setFileSize(Long fileSize) 
    {
        this.fileSize = fileSize;
    }

    public Long getFileSize() 
    {
        return fileSize;
    }
    public void setMd5(String md5) 
    {
        this.md5 = md5;
    }

    public String getMd5() 
    {
        return md5;
    }
    public void setIsdir(String isdir) 
    {
        this.isdir = isdir;
    }

    public String getIsdir() 
    {
        return isdir;
    }
    public void setCategory(String category) 
    {
        this.category = category;
    }

    public String getCategory() 
    {
        return category;
    }
    public void setUptime(Date uptime) 
    {
        this.uptime = uptime;
    }

    public Date getUptime() 
    {
        return uptime;
    }
    public void setUploader(String uploader) 
    {
        this.uploader = uploader;
    }

    public String getUploader() 
    {
        return uploader;
    }
    public void setState(String state) 
    {
        this.state = state;
    }

    public String getState() 
    {
        return state;
    }
    public void setResrved1(String resrved1) 
    {
        this.resrved1 = resrved1;
    }

    public String getResrved1() 
    {
        return resrved1;
    }
    public void setResrved2(String resrved2) 
    {
        this.resrved2 = resrved2;
    }

    public String getResrved2() 
    {
        return resrved2;
    }
    public void setResrved3(String resrved3) 
    {
        this.resrved3 = resrved3;
    }

    public String getResrved3() 
    {
        return resrved3;
    }
    public void setResrved4(String resrved4) 
    {
        this.resrved4 = resrved4;
    }

    public String getResrved4() 
    {
        return resrved4;
    }

    public List<OaFile> getChildren() {
        return children;
    }

    public void setChildren(List<OaFile> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("fid", getFid())
            .append("parentPath", getParentPath())
            .append("serverFilename", getServerFilename())
            .append("fileSize", getFileSize())
            .append("md5", getMd5())
            .append("isdir", getIsdir())
            .append("category", getCategory())
            .append("uptime", getUptime())
            .append("uploader", getUploader())
            .append("state", getState())
            .append("resrved1", getResrved1())
            .append("resrved2", getResrved2())
            .append("resrved3", getResrved3())
            .append("resrved4", getResrved4())
            .toString();
    }
}
